import { http } from "@/utils/http";

type ResultTable = {
  total?: number;
  data?: Array<any>;
};
/**
 * 改善详情接口
 */
// 获取改善编号
export const queryEnum = (data?: object) => {
  return http.request("get", `/digitaltwins/api/v1/improve/enum/query`, {
    data
  });
};
// 查询改善信息
export const queryImprove = (data?: object) => {
  return http.request<ResultTable>("post", "/digitaltwins/api/v1/improve/query", {
    data
  });
};
// 获取改善编号
export const getImproveId = (data?: object) => {
  return http.request("get", `/digitaltwins/api/v1/improve/getImproveId`, {
    data
  });
};
// 新增改善
export const createImprove = (data?: object) => {
  return http.request("post", "/digitaltwins/api/v1/improve/create", {
    data
  });
};
// 编辑改善
export const updateImprove = (data?: object) => {
  return http.request("post", "/digitaltwins/api/v1/improve/update", {
    data
  });
};
// 查看改善
export const viewImprove = (data?: object) => {
  return http.request("post", "/digitaltwins/api/v1/improve/get", {
    data
  });
};
